package com.after.saas.file.controller;

import com.after.saas.common.constants.Result;
import com.after.saas.common.utils.ResponseUtil;
import com.after.saas.file.service.CacheService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Classname TestController
 * @Description TODO
 * @auth after
 * @since 2023/6/22 10:29
 */
@Slf4j
@RestController
@RequestMapping("/test")
public class TestController {

    private final CacheService cacheService;

    public TestController(CacheService cacheService) {
        this.cacheService = cacheService;
    }

    @GetMapping("/testCallable")
    public Result testGuavaCache(String code){
        return ResponseUtil.SUCCESS(cacheService.getAll(code));
    }
}
